package com.maoning.member.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.maoning.common.utils.PageUtils;
import com.maoning.common.vo.SocialUser;
import com.maoning.member.entity.MemberEntity;
import com.maoning.member.entity.MemberLevelEntity;
import com.maoning.member.exception.UserOrPasswordErrorException;
import com.maoning.member.vo.MemberLoginVo;
import com.maoning.member.vo.MemberRegistVo;
import com.maoning.member.exception.PhoneExistException;
import com.maoning.member.exception.UsernameExistException;

import java.util.Map;

/**
 * 会员
 *
 * @author ss
 * @email 361736093@qq.com
 * @date 2021-08-19 17:13:19
 */
public interface MemberService extends IService<MemberEntity> {

    PageUtils queryPage(Map<String, Object> params);

    void regist(MemberRegistVo memberRegistVo) throws PhoneExistException,UsernameExistException;

    MemberLevelEntity getDefaultLevel();

    void checkPhoneUnique(String phone) throws PhoneExistException;

    void checkUserNameUnique(String userName) throws UsernameExistException;

    MemberEntity login(MemberLoginVo memberLoginVo);

    MemberEntity oauth2Login(SocialUser socialUser);
}

